<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/11 0011
 * Time: 14:58
 */

//CommonModel 自动继承
function CM($name)
{
    static $_model = array();
    if (isset($_model[$name]))
    {
        return $_model[$name];
    }
    $class = CONTROLLER_NAME;
    import('@.Model.' . $name);
    $return = D($class);
    $_model[$class] = $return;
    return $return;
}


function catename($cateid)
{
    $info=M("article_news")->field("title")->where( array("id"=>$cateid) )->find();
    return $info["title"];
}